<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: mets::permutation_problem类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classmets_1_1permutation__problem.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pro-attribs">Protected 属性</a> &#124;
<a href="#friends">友元</a> &#124;
<a href="classmets_1_1permutation__problem-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">mets::permutation_problem类 参考<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="group__model.html">Model</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>An abstract permutation problem.  
 <a href="classmets_1_1permutation__problem.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="model_8hh_source.html">model.hh</a>&gt;</code></p>
<div class="dynheader">
类 mets::permutation_problem 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classmets_1_1permutation__problem.png" usemap="#mets::permutation_5Fproblem_map" alt=""/>
  <map id="mets::permutation_5Fproblem_map" name="mets::permutation_5Fproblem_map">
<area href="classmets_1_1evaluable__solution.html" title="A copyable and evaluable solution implementation," alt="mets::evaluable_solution" shape="rect" coords="85,56,245,80"/>
<area href="classmets_1_1feasible__solution.html" title="interface of a feasible solution space to be searched with tabu search." alt="mets::feasible_solution" shape="rect" coords="0,0,160,24"/>
<area href="classmets_1_1copyable.html" title="An interface for copyable objects." alt="mets::copyable" shape="rect" coords="170,0,330,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a8c23c755746873a10c81582bffb5d48b"><td class="memItemLeft" align="right" valign="top"><a id="a8c23c755746873a10c81582bffb5d48b"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1permutation__problem.html#a8c23c755746873a10c81582bffb5d48b">permutation_problem</a> ()</td></tr>
<tr class="memdesc:a8c23c755746873a10c81582bffb5d48b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unimplemented. <br /></td></tr>
<tr class="separator:a8c23c755746873a10c81582bffb5d48b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e8d83afe5be26c7000dafe31674efd5"><td class="memItemLeft" align="right" valign="top"><a id="a8e8d83afe5be26c7000dafe31674efd5"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1permutation__problem.html#a8e8d83afe5be26c7000dafe31674efd5">permutation_problem</a> (int n)</td></tr>
<tr class="memdesc:a8e8d83afe5be26c7000dafe31674efd5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inizialize pi_m = {0, 1, 2, ..., n-1}. <br /></td></tr>
<tr class="separator:a8e8d83afe5be26c7000dafe31674efd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb6ec1359a68d87ff2a3f1648c684b8a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1permutation__problem.html#afb6ec1359a68d87ff2a3f1648c684b8a">copy_from</a> (const <a class="el" href="classmets_1_1copyable.html">copyable</a> &amp;other)</td></tr>
<tr class="memdesc:afb6ec1359a68d87ff2a3f1648c684b8a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy from another permutation problem, if you introduce new member variables remember to override this and to call <a class="el" href="classmets_1_1permutation__problem.html#afb6ec1359a68d87ff2a3f1648c684b8a" title="Copy from another permutation problem, if you introduce new member variables remember to override thi...">permutation_problem::copy_from</a> in the overriding code.  <a href="classmets_1_1permutation__problem.html#afb6ec1359a68d87ff2a3f1648c684b8a">更多...</a><br /></td></tr>
<tr class="separator:afb6ec1359a68d87ff2a3f1648c684b8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ae9de2f07e547f9140f8b77ea9fc5bf"><td class="memItemLeft" align="right" valign="top">virtual gol_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1permutation__problem.html#a5ae9de2f07e547f9140f8b77ea9fc5bf">compute_cost</a> () const =0</td></tr>
<tr class="memdesc:a5ae9de2f07e547f9140f8b77ea9fc5bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">: Compute cost of the whole solution.  <a href="classmets_1_1permutation__problem.html#a5ae9de2f07e547f9140f8b77ea9fc5bf">更多...</a><br /></td></tr>
<tr class="separator:a5ae9de2f07e547f9140f8b77ea9fc5bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a223eaad235680e4d4f3008ac7eeaeb82"><td class="memItemLeft" align="right" valign="top">virtual gol_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1permutation__problem.html#a223eaad235680e4d4f3008ac7eeaeb82">evaluate_swap</a> (int i, int j) const =0</td></tr>
<tr class="memdesc:a223eaad235680e4d4f3008ac7eeaeb82"><td class="mdescLeft">&#160;</td><td class="mdescRight">: Evaluate a swap.  <a href="classmets_1_1permutation__problem.html#a223eaad235680e4d4f3008ac7eeaeb82">更多...</a><br /></td></tr>
<tr class="separator:a223eaad235680e4d4f3008ac7eeaeb82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa89b4d4809ec78d687d0537d833adc27"><td class="memItemLeft" align="right" valign="top"><a id="aa89b4d4809ec78d687d0537d833adc27"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1permutation__problem.html#aa89b4d4809ec78d687d0537d833adc27">size</a> () const</td></tr>
<tr class="memdesc:aa89b4d4809ec78d687d0537d833adc27"><td class="mdescLeft">&#160;</td><td class="mdescRight">The size of the problem. Do not override unless you know what you are doing. <br /></td></tr>
<tr class="separator:aa89b4d4809ec78d687d0537d833adc27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99eb2edeb0132b1c92bd146bda766b30"><td class="memItemLeft" align="right" valign="top"><a id="a99eb2edeb0132b1c92bd146bda766b30"></a>
gol_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1permutation__problem.html#a99eb2edeb0132b1c92bd146bda766b30">cost_function</a> () const</td></tr>
<tr class="memdesc:a99eb2edeb0132b1c92bd146bda766b30"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the cost of the current solution. The default implementation provided returns the protected mets::permutation_problem::cost_m member variable. Do not override unless you know what you are doing. <br /></td></tr>
<tr class="separator:a99eb2edeb0132b1c92bd146bda766b30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4dbc23d8f3e8e0fda5d085c75c87186c"><td class="memItemLeft" align="right" valign="top"><a id="a4dbc23d8f3e8e0fda5d085c75c87186c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1permutation__problem.html#a4dbc23d8f3e8e0fda5d085c75c87186c">update_cost</a> ()</td></tr>
<tr class="memdesc:a4dbc23d8f3e8e0fda5d085c75c87186c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the cost with the one computed by the subclass. Do not override unless you know what you are doing. <br /></td></tr>
<tr class="separator:a4dbc23d8f3e8e0fda5d085c75c87186c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04b74de5cecfec914c53d5ff07129f3b"><td class="memItemLeft" align="right" valign="top"><a id="a04b74de5cecfec914c53d5ff07129f3b"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1permutation__problem.html#a04b74de5cecfec914c53d5ff07129f3b">apply_swap</a> (int i, int j)</td></tr>
<tr class="memdesc:a04b74de5cecfec914c53d5ff07129f3b"><td class="mdescLeft">&#160;</td><td class="mdescRight">: Apply a swap and update the cost. Do not override unless you know what you are doing. <br /></td></tr>
<tr class="separator:a04b74de5cecfec914c53d5ff07129f3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classmets_1_1feasible__solution"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classmets_1_1feasible__solution')"><img src="closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="classmets_1_1feasible__solution.html">mets::feasible_solution</a></td></tr>
<tr class="memitem:ab15b3260d5e1eec2a79e103347ca788f inherit pub_methods_classmets_1_1feasible__solution"><td class="memItemLeft" align="right" valign="top"><a id="ab15b3260d5e1eec2a79e103347ca788f"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1feasible__solution.html#ab15b3260d5e1eec2a79e103347ca788f">~feasible_solution</a> ()</td></tr>
<tr class="memdesc:ab15b3260d5e1eec2a79e103347ca788f inherit pub_methods_classmets_1_1feasible__solution"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual dtor. <br /></td></tr>
<tr class="separator:ab15b3260d5e1eec2a79e103347ca788f inherit pub_methods_classmets_1_1feasible__solution"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected 属性</h2></td></tr>
<tr class="memitem:ab6271f55a56fd270e7421970f4b72e99"><td class="memItemLeft" align="right" valign="top"><a id="ab6271f55a56fd270e7421970f4b72e99"></a>
std::vector&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>pi_m</b></td></tr>
<tr class="separator:ab6271f55a56fd270e7421970f4b72e99"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1279fab3b6f1617e1f9a968928e949d4"><td class="memItemLeft" align="right" valign="top"><a id="a1279fab3b6f1617e1f9a968928e949d4"></a>
gol_type&#160;</td><td class="memItemRight" valign="bottom"><b>cost_m</b></td></tr>
<tr class="separator:a1279fab3b6f1617e1f9a968928e949d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
友元</h2></td></tr>
<tr class="memitem:acb7ee40eabc97ada1f9d4d6cda486c66"><td class="memTemplParams" colspan="2">template&lt;typename random_generator &gt; </td></tr>
<tr class="memitem:acb7ee40eabc97ada1f9d4d6cda486c66"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classmets_1_1permutation__problem.html#acb7ee40eabc97ada1f9d4d6cda486c66">random_shuffle</a> (<a class="el" href="classmets_1_1permutation__problem.html">permutation_problem</a> &amp;p, random_generator &amp;rng)</td></tr>
<tr class="memdesc:acb7ee40eabc97ada1f9d4d6cda486c66"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shuffle a permutation problem (generates a random starting point).  <a href="classmets_1_1permutation__problem.html#acb7ee40eabc97ada1f9d4d6cda486c66">更多...</a><br /></td></tr>
<tr class="separator:acb7ee40eabc97ada1f9d4d6cda486c66"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>An abstract permutation problem. </p>
<p>The permutation problem provides a skeleton to rapidly prototype permutation problems (such as Assignment problem, Quadratic AP, TSP, and so on). The skeleton holds a pi_m variable that, at each step, contains a permutation of the numbers in [0..n-1].</p>
<p>A few operators are provided to randomly choose a solution, to perturbate a solution with some random swaps and to simply swap two items in the list.</p>
<dl class="section see"><dt>参见</dt><dd><a class="el" href="classmets_1_1swap__elements.html" title="A mets::mana_move that swaps two elements in a mets::permutation_problem.">mets::swap_elements</a> </dd></dl>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a5ae9de2f07e547f9140f8b77ea9fc5bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5ae9de2f07e547f9140f8b77ea9fc5bf">&#9670;&nbsp;</a></span>compute_cost()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual gol_type mets::permutation_problem::compute_cost </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>: Compute cost of the whole solution. </p>
<p>You will need to override this one. </p>

</div>
</div>
<a id="afb6ec1359a68d87ff2a3f1648c684b8a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb6ec1359a68d87ff2a3f1648c684b8a">&#9670;&nbsp;</a></span>copy_from()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void mets::permutation_problem::copy_from </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classmets_1_1copyable.html">copyable</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Copy from another permutation problem, if you introduce new member variables remember to override this and to call <a class="el" href="classmets_1_1permutation__problem.html#afb6ec1359a68d87ff2a3f1648c684b8a" title="Copy from another permutation problem, if you introduce new member variables remember to override thi...">permutation_problem::copy_from</a> in the overriding code. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">other</td><td>the problem to copy from </td></tr>
  </table>
  </dd>
</dl>

<p>实现了 <a class="el" href="classmets_1_1copyable.html">mets::copyable</a>.</p>
<div class="fragment"><div class="line"><a name="l00723"></a><span class="lineno">  723</span>&#160;{</div>
<div class="line"><a name="l00724"></a><span class="lineno">  724</span>&#160;  <span class="keyword">const</span> <a class="code" href="classmets_1_1permutation__problem.html">mets::permutation_problem</a>&amp; o = </div>
<div class="line"><a name="l00725"></a><span class="lineno">  725</span>&#160;    <span class="keyword">dynamic_cast&lt;</span><span class="keyword">const </span><a class="code" href="classmets_1_1permutation__problem.html">mets::permutation_problem</a>&amp;<span class="keyword">&gt;</span>(other);</div>
<div class="line"><a name="l00726"></a><span class="lineno">  726</span>&#160;  pi_m = o.pi_m;</div>
<div class="line"><a name="l00727"></a><span class="lineno">  727</span>&#160;  cost_m = o.cost_m;</div>
<div class="line"><a name="l00728"></a><span class="lineno">  728</span>&#160;}</div>
<div class="ttc" id="aclassmets_1_1permutation__problem_html"><div class="ttname"><a href="classmets_1_1permutation__problem.html">mets::permutation_problem</a></div><div class="ttdoc">An abstract permutation problem.</div><div class="ttdef"><b>Definition:</b> model.hh:183</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a223eaad235680e4d4f3008ac7eeaeb82"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a223eaad235680e4d4f3008ac7eeaeb82">&#9670;&nbsp;</a></span>evaluate_swap()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual gol_type mets::permutation_problem::evaluate_swap </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>j</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>: Evaluate a swap. </p>
<p>Implement this method to evaluate the change in the cost function after the swap (without actually modifying the solution). The method should return the difference in cost between the current position and the position after the swap (negative if decreasing and positive otherwise).</p>
<p>To obtain maximal performance from the algorithm it is essential, whenever possible, to only compute the cost update and not the whole cost function. </p>

</div>
</div>
<h2 class="groupheader">友元及相关函数文档</h2>
<a id="acb7ee40eabc97ada1f9d4d6cda486c66"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb7ee40eabc97ada1f9d4d6cda486c66">&#9670;&nbsp;</a></span>random_shuffle</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename random_generator &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void random_shuffle </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmets_1_1permutation__problem.html">permutation_problem</a> &amp;&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">random_generator &amp;&#160;</td>
          <td class="paramname"><em>rng</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Shuffle a permutation problem (generates a random starting point). </p>
<dl class="section see"><dt>参见</dt><dd><a class="el" href="classmets_1_1permutation__problem.html" title="An abstract permutation problem.">mets::permutation_problem</a> </dd></dl>
<div class="fragment"><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;  {</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;<span class="preprocessor">#if defined (METSLIB_TR1_BOOST)</span></div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;    boost::uniform_int&lt;size_t&gt; unigen;</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;    boost::variate_generator&lt;random_generator&amp;,</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;      boost::uniform_int&lt;size_t&gt; &gt;gen(rng, unigen);</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;<span class="preprocessor">#elif defined (METSLIB_HAVE_UNORDERED_MAP) &amp;&amp; !defined (METSLIB_TR1_MIXED_NAMESPACE)</span></div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;    std::uniform_int&lt;size_t&gt; unigen;</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;    std::variate_generator&lt;random_generator&amp;, </div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;      std::uniform_int&lt;size_t&gt; &gt;gen(rng, unigen);</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;    std::tr1::uniform_int&lt;size_t&gt; unigen;</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;    std::tr1::variate_generator&lt;random_generator&amp;, </div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;      std::tr1::uniform_int&lt;size_t&gt; &gt;gen(rng, unigen);</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;    <a class="code" href="group__model.html#gacfbb156f3953666fe3ee538ceb770f65">std::random_shuffle</a>(p.pi_m.begin(), p.pi_m.end(), gen);</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;    p.update_cost();</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;  }</div>
<div class="ttc" id="agroup__model_html_gacfbb156f3953666fe3ee538ceb770f65"><div class="ttname"><a href="group__model.html#gacfbb156f3953666fe3ee538ceb770f65">mets::random_shuffle</a></div><div class="ttdeci">void random_shuffle(permutation_problem &amp;p, random_generator &amp;rng)</div><div class="ttdoc">Shuffle a permutation problem (generates a random starting point).</div><div class="ttdef"><b>Definition:</b> model.hh:258</div></div>
</div><!-- fragment -->
</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>recognition/include/pcl/recognition/3rdparty/metslib/<a class="el" href="model_8hh_source.html">model.hh</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>mets</b></li><li class="navelem"><a class="el" href="classmets_1_1permutation__problem.html">permutation_problem</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
